<script type="text/javascript" src="jquery-1.10.1.min.js"></script>

<script type="text/javascript">
  jQuery(document).ready(function(){

    $('a:eq(1)').on('click',function(){
      alert('Wow :) I am at 2nd');
    });

    $('a:last').on('click',function(){
      alert('Hmmm I am at Last...');
    });

    $('a:first').on('click',function(){
      alert('Hello I am at First...');
    });

    $('a#clkId ,.test').on('click',function(){
      alert('Clicked By ID');
    });

    $('a.clkClass').on('click',function(){
      alert('Clicked By CLASS');
    });

  });
</script>

==><a href="#">Click Here</a><br><br>
==><a href="#">Click Here</a><br><br>
<a href="#">Click Here</a><br><br>
<a href="#">Click Here</a><br><br>
<a href="#">Click Here</a><br><br>
==><a id="clkId" href="#">Click Here:By Id or 'test' class</a><br><br>
<a href="#">Click Here</a><br><br>
==><a class="test" href="#">Click Here:By Id or 'test' class</a><br><br>
<a href="#">Click Here</a><br><br>
==><a class="clkClass" href="#">Click Here</a><br><br>
<a href="#">Click Here</a><br><br>
<a href="#">Click Here</a><br><br>
==><a href="#">Click Here</a><br><br>
